Graphics processing is an important feature of modern high-performance computing systems. In graphic processing, mathematical procedures are implemented to render, or draw, graphic primitives, e.g., a triangle or a rectangle, on a display to produce desired visual images. Real time graphics processing is based on the high-speed processing of graphic primitives to produce visually pleasing moving images.
Early graphic systems were limited to displaying image objects comprised of graphic primitives having smooth surfaces. That is, visual textures, bumps, scratches, or other surface features were not modeled in the graphics primitives. To enhance image quality, texture mapping of real world attributes was introduced. In general, texture mapping is the mapping of an image onto a graphic primitive surface to create the appearance of a complex image without the high computational costs associated with rendering actual three dimensional details of an object.
Graphics processing is typically performed using application program interfaces (API's) that provide a standard software interface that can be run on multiple platforms, operating systems; and hardware. Examples of API's include the Open Graphics Library (OpenGL®) and D3D™. In general, such open application programs include a predetermined, standardized set of commands that are executed by associated hardware. For example, in a computer system that supports the OpenGL® standard, the operating system and application software programs can make calls according to that standard without knowing any of the specifics regarding the system hardware. Application writers can use APIs to design the visual aspects of their applications without concern as to how their commands will be implemented.
APIs are particularly beneficial when they are supported by dedicated hardware. In fact, high-speed processing of graphical images is often performed using special graphics processing units (GPUs) that are fabricated on semiconductor substrates. Beneficially, a GPU can be designed and used to rapidly and accurately process commands with little impact on other system resources.
FIG. 1 illustrates a simplified block diagram of a graphics system 100 that includes a graphics processing unit 102. As shown, that graphics processing unit 102 has a host interface/front end 104. The host interface/front end 104 receives raw graphics data from a central processing unit 103 that is running an application program stored in memory 105. The host interface/front end 104 buffers input information and supplies that information to a geometry engine 106. The geometry engine has access to a frame buffer memory 120 via a frame buffer interface 116. The geometry engine 106 produces, scales, rotates, and projects three-dimensional vertices of graphics primitives in “model” coordinates that are stored in the frame buffer memory 120 into two-dimensional frame-buffer co-ordinates. Typically, triangles are used as graphics primitives for three-dimensional objects, but rectangles are often used for 2-dimensional objects (such as text displays).
The two-dimensional frame-buffer co-ordinates of the vertices of the graphics primitives from the geometry engine 106 are applied to a rasterizer 108. The rasterizer 108 identifies the positions of all of the pixels within the graphics primitives. This is typically performed along raster (horizontal) lines that extend between the lines that define the graphics primitives. The output of the rasterizer 108 is referred to as rasterized pixel data.
The rasterized pixel data are applied to a shader 110 that processes input data (code, position, texture, conditions, constants, etc) using a shader program (sequence of instructions) to generate output data. While shaders are described in relation to graphics processing, shaders are, in general, useful for many other functions. Shaders can be considered as a collection of processing capabilities that can handle large amounts of data at the same time, such as by parallel handling of data.
The shader 110 includes a texture engine 112 that modifies the rasterized pixel data to have the desired texture and optical features. The texture engine 112, which has access to the data stored in the frame buffer memory 120, can be implemented using a hardware pipeline that processes large amounts of data at very high speed. The shaded pixel data is then sent to a Raster Operations Processor 114 (Raster op in FIG. 1) that optionally performs additional processing on the shaded pixel data. The result is pixel data that is stored in the frame buffer memory 120 by the frame buffer interface 116. The frame pixel data can be used for various processes such as being displayed on a display 122.
Programmable shaders enable flexibility in the achievable visual effects and can reduce the time between a graphics function being made available and that function becoming standardized as part of a graphics API. Programmable shaders can have a standard API mode in which standard graphics API commands are implemented and a non-standard mode in which new graphics features can be programmed.
While shaders have proven themselves to be useful, demands for shader performance have exceeded the capabilities of existing shaders. While improving existing shaders could address some of the demands, such improvements would be difficult to implement. Furthermore, future demands can be anticipated to exceed the capabilities achievable by improved existing shader architectures and implementations. Therefore, a new shader architecture would be beneficial. Even more beneficial would be a new, high-performance programmable shader architecture that enables software-programmed graphics features. Also beneficial would be a new, high-performance programmable shader architecture that can be scaled as required to meet shader performance demands and that can be expanded to enable advanced graphical functionalities.
Additionally, since GPUs are large, complex semiconductor devices that operate at high speed and that generate large amounts of heat, and since a shader represents a significant area of a GPU, shader defects produce a significant percentage of GPU chip rejections. A shader architecture having the capability of enabling and disabling functional portions of a shader while still providing for shader processing functions would be beneficial.